(function () {
    var Land = window.Land = function () {
        this.img = game.imgList.land;
        this.x0 = 0;
        this.y0 = game.ctx.canvas.height*0.78;

    };
    Land.prototype.update = function () {
        this.x0 -= 2;
        if(this.x0 <= -this.img.width){
            this.x0 = 0;
        }
    };
    Land.prototype.render = function () {
        game.ctx.drawImage(this.img, 0,0, this.img.width,this.img.height, this.x0,this.y0, this.img.width,this.img.height);
        game.ctx.drawImage(this.img, 0,0, this.img.width,this.img.height, this.x0+this.img.width,this.y0, this.img.width,this.img.height);
        game.ctx.drawImage(this.img, 0,0, this.img.width,this.img.height, this.x0+this.img.width*2,this.y0, this.img.width,this.img.height);
        game.ctx.fillStyle = "#ded895";
        game.ctx.fillRect(0,game.ctx.canvas.height * 0.78+50, game.ctx.canvas.width,game.ctx.canvas.height * 0.22);
    };
}());